<template>
    <div>
        
                <!-- 路由出口 -->
                <!-- 路由匹配到的组件将渲染在这里 -->
                <router-view></router-view>

    </div>
</template>
<script>
    import HomePage from './Home/HomePage.vue'
    import SystemPage from './SystemHome/SystemPage.vue'
    export default {
        data() {
            return {
                
            }
        },
        components: {
            HomePage,
            SystemPage,
        },
        methods: {
            goHome(){
                this.$router.push('/home')
                this.$message({
                    showClose: true,
                    message: 'welcome',
                    type: 'success'
                });
            }
        },
        mounted(){
            if(!this.$root.$flag){
                this.goHome()
            }
            this.$root.$flag = true
        }
    }
</script>